package com.zt.bigdata.practise.math;

import org.apache.commons.math3.stat.StatUtils;
import org.apache.commons.math3.stat.descriptive.DescriptiveStatistics;

/**
 * @ClassName MyMath
 * @Description
 * @Author zhangtonghy
 * @Date 2019-07-09 10:26
 * @Copyright: 版权所有 (C) zt zt.
 * @注意：本内容仅限于zt内部传阅，禁止外泄以及用于其他的商业目的
 **/
public class MyMath {
    private static double[] values = {2, 4, 6, 8};

    public static void main(String[] args) {
        DescriptiveStatistics stats = new DescriptiveStatistics(values);

        System.out.println("样本方差:" + stats.getVariance());
        System.out.println("样本标准差:" + stats.getStandardDeviation());
        System.out.println("均值:" + stats.getMean());


        System.out.println("总体方差:" + stats.getPopulationVariance());
        System.out.println("总体标准差:"  );

    }
}
